<%@ page language="java" pageEncoding="utf8"%>
<%
Integer movieId = new Integer(request.getParameter("movieID"));
 %>
<jsp:include page="/head.jsp" />
<script type="text/javascript" src="./script/movieSession.js"></script>
<script type="text/javascript">
		dojo.addOnLoad(function(){
			var bookTicketsAEle =  document.getElementById("a_bookTickets");
  			bookTicketsAEle.className = "active";
  			MovieSession.movieId = <%=movieId%>;
  			MovieSession.action = "book";
  			MovieSession.askForMovieBriefInfo();
			MovieSession.askForMovieSessionInfo();
			dijit.byId("sessionGrid").resize();
		});
		
		var allSessions = {
        	items:[]
        };
		var sessionStore = new dojo.data.ItemFileWriteStore({data:allSessions});
		
		function bookOnLine(sessionId) {
			window.location.href = "movieRoom.jsp?sessionId="+sessionId;
		}
</script>
<style type="text/css">
	#sessionGrid{
		width:98%;
	}
	.dojoxGrid table {
        margin: 0;
        font-size: 12px;
        text-align: center;
    }
</style>


<div class="maincontent">
	<div class="HackBox"></div>
	<div id="breadcrumb">
		&nbsp;
		<a href="Home.htm">网上订票</a>&nbsp;&gt;&nbsp;
		<font color=red>选择场次</font>
	</div>

	<div class="maincontentin">
		<div class="movieRoomDiv" style="height: 424px;">
			<div class="movieDescDiv">
				<table>
					<tr>
 						<td>
 							<img id="mrPhoto" src="">
 						</td>
 						<td>
 							<ul class="movieBriefInfo">
 								<li style="font-size: 14px; color: red;"><span id="mrName"></span></li>
 								<li>语言：<span id="mrLanguage"></span></li>
 								<li>时长：<span id="mrTime"></span></li>
 							</ul>
 						</td>
 					</tr>
				</table>
			</div>
			<div class="dotted_line" style="padding:5px"></div>
			<div id="adminGridDiv">
				<table dojoType="dojox.grid.DataGrid" id="sessionGrid" selectionMode="single" autoHeight="true" 
				 style="background:white" store="sessionStore">
					<thead>
						<tr>
							<th field="movieName" width="30%">电影名</th>
							<th field="sessionName" width="30%">放映场次</th>
							<th field="hallName" width="20%">放映厅</th>
							<th field="price" width="10%">票价</th>
							<th field="bookOnLine" width="10%">在线订票</th>
						</tr>
					</thead>
				</table>
			</div>
		</div>
	</div>
	<!-- main content -->
</div>

<jsp:include page="footer.jsp" />